/*
 * @Author: 刘润泽
 * @Date: 2023-02-22 19:39:56
 * @LastEditors: 刘润泽
 * @LastEditTime: 2023-03-07 15:31:43
 * @Description: 
 */
package server.business.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import server.business.pojo.AboType;
import server.business.service.AboTypeService;
import server.business.utils.Result;

import java.util.List;

@Controller
@RequestMapping("/aboType")
public class AboTypeController {
    @Autowired
    private AboTypeService aboTypeService;

    /**
     * 查询ABO血型
     */
    @RequestMapping("/normal/queryAboType")
    @ResponseBody
    public Result queryAboType() {
        aboTypeService.list();
        Result result = new Result();
        result.setCode("200");
        result.setData(aboTypeService.list());
        return result;
    }

    @RequestMapping("/normal/query")
    @ResponseBody
    public List<AboType> queryData() {
        List<AboType> list = aboTypeService.queryData();
        return list;
    }

    @GetMapping("/normal/getName")
    @ResponseBody
    public server.business.utils.results.lrz.Result getName() {
        List<AboType> aboTypeList = aboTypeService.list();
        return server.business.utils.results.lrz.Result.success(aboTypeList);
    }
    /**
     * 获取ABO血型数据字典myq
     */
    @GetMapping("/normal/type")
    @ResponseBody
    public List<AboType> getAboType() {
        return aboTypeService.list();
    }

}
